package com.game.centerserver.pojo.result;

import com.game.centerserver.infrastructure.entity.ServerMasterInfo;
import lombok.Data;

@Data
public class ServerMasterView {
    /**
     * 公网IP
     */
    private String ip;

    private Integer port;
    /**
     * 内网IP
     */
    private String intranetIp;
    /**
     * CPU主频
     */
    private Float cpuFrequency;
    /**
     * CPU核心数
     */
    private Integer cpuCores;
    /**
     * 内存大小，单位是GB
     */
    private Integer memSize;
    /**
     * 上行带宽
     */
    private Float upstreamBandwidth;
    /**
     * 下行带宽
     */
    private Float downstreamBandwidth;

    public ServerMasterView() {
    }

    public ServerMasterView(ServerMasterInfo serverMasterInfo) {
        this.ip = serverMasterInfo.getIp();
        this.port = serverMasterInfo.getPort();
        this.intranetIp = serverMasterInfo.getIntranetIp();
        this.cpuFrequency = serverMasterInfo.getCpuFrequency();
        this.cpuCores = serverMasterInfo.getCpuCores();
        this.memSize = serverMasterInfo.getMemSize();
        this.upstreamBandwidth = serverMasterInfo.getUpstreamBandwidth();
        this.downstreamBandwidth = serverMasterInfo.getDownstreamBandwidth();
    }
}
